From 8f783a9dff62847361811e26768fe4727846448d Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Thu, 28 Aug 2008 15:38:13 +0000 Subject: [PATCH] Fix dhcp initscript logic to handle failures properly (#3941) SVN-Revision: 12425 --- net/dhcp/files/dhcpd.init | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/dhcp/files/dhcpd.init b/net/dhcp/files/dhcpd.init index ea16f01be..c874552cc 100644 --- a/net/dhcp/files/dhcpd.init +++ b/net/dhcp/files/dhcpd.init @@ -15,7 +15,7 @@ start() { /usr/sbin/dhcpd -q -cf $config_file -lf $lease_file - if [ $? -eq 0 ]; then + if [ $? -ne 0 ]; then echo " isc-dhcpd failed to start" fi } @@ -25,7 +25,7 @@ stop() { if [ -e $pid_file ]; then kill `cat $pid_file` - if [ $? -eq 0 ]; then + if [ $? -ne 0 ]; then echo " PID " `cat $pid_file` not found echo " Is the DHCP server running?" fi -- 2.30.2